﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Jzy.BLL.SiteAdmin;
using Jzy.Model.SiteAdmin;

namespace Jzy.Web.WebSite.Controls
{
    public partial class Design : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ArticleBO article = new ArticleBO();
            IEnumerable<ArticleInfo> list = article.GetDisplayListByCode(3,8);

            rpt1.DataSource = list;
            rpt1.DataBind();

            list = article.GetDisplayListByCode(4, 8);
            rpt2.DataSource = list;
            rpt2.DataBind();
        }

        protected string GetUrl(object source, object bigImageAbsPath)
        {
            if (source != null && source.ToString() != "")
            {
                return source.ToString();
            }
            else
            {
                return bigImageAbsPath.ToString();
            }
        }
    }
}